package com.xbongbong.saas.enums.business;

import com.xbongbong.i18n.util.I18nMessageUtil;
import com.xbongbong.paas.enums.FieldTypeEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;


/**
 * Description:
 *
 * @Author: pkh
 * @Date: 11-21
 */
@Getter
@AllArgsConstructor
public enum ContractCompareEnum {

    STANDARD_CONTRACT_NAME("standard_contract_name", "enum.contractCompare.attrName.standardContractName", "standardContractName", FieldTypeEnum.TEXT.getType()),
    STANDARD_CONTRACT_FILE("standard_contract_file", "enum.contractCompare.attrName.standardContractFile", "standardContractFile", FieldTypeEnum.TEXT.getType()),
    COMPARE_CONTRACT_NAME("compare_contract_name", "enum.contractCompare.attrName.compareContractName", "compareContractName", FieldTypeEnum.TEXT.getType()),
    COMPARE_CONTRACT_FILE("compare_contract_file", "enum.contractCompare.attrName.compareContractFile", "compareContractFile", FieldTypeEnum.TEXT.getType()),
    FORM_TYPE("form_type", "enum.contractCompare.attrName.formType", "formType", FieldTypeEnum.NUM.getType()),
    COMPARE_STATUS("compare_status", "enum.contractCompare.attrName.compareStatus", "compareStatus", FieldTypeEnum.NUM.getType()),
    CREATOR_ID("creator_id", "enum.contractCompare.attrName.creatorId", "creatorId", FieldTypeEnum.CREATORID.getType()),
    ADD_TIME("add_time", "enum.contractCompare.attrName.addTime", "addTime", FieldTypeEnum.DATETIME.getType()),
    ;


    /**
     * 英文名称
     */
    private String attr;
    /**
     * 中文名称
     */
    private String attrName;
    /**
     * 对应saas中的attr
     */
    private String saasAttr;
    /**
     * 字段类型，详见
     *
     * @see com.xbongbong.paas.enums.FieldTypeEnum
     */
    private Integer fieldType;

    public String getAttrName(){
        return I18nMessageUtil.getMessage(attrName);
    }
}
